{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2023, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}

<br>
<h6 style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
  {{element.NAME}}<br>
  <span class="total_cost_div" hidden>
    <small class="cost_value">0.00</small>
    <small>{{tr "COST"}} / {{tr "HOUR"}}</small>
  </span>
</h6>
<div class="template-row" element-id="{{element.ID}}">
  <div class="row">
    <div class="large-2 small-12 columns">
      <span>
        <img src="{{element.TEMPLATE.LOGO}}">
      </span>
    </div>
    <div class="large-5 medium-6 small-12 columns capacityContext{{element.ID}}" style="padding-top: 15px; padding-left: 35px">
      <fieldset>
        <legend>
          <i class="fas fa-laptop"></i> {{tr "Capacity"}}
          <span class="capacity_cost_div" hidden>
            <span class="cost_value">0.00</span>
            <small>{{tr "COST"}} / {{tr "HOUR"}}</small>
          </span>
        </legend>
        <div>
          {{{capacityInputsHTML}}}
        </div>
      </fieldset>
    </div>
    <div class="large-5 medium-6 small-12 columns disksContext{{element.ID}}" style="padding-top: 15px"></div>
  </div>
  <div class="row">
    <div class="medium-5 small-12 columns template_user_inputs{{element.ID}}"></div>
  </div>
  {{#isFeatureEnabled "show_vnet_instantiate"}}
  {{#advancedImportationSection "<i class=\"fas fa-code-branch\"></i>" (tr "Network") }}
  <div class="row">
    <div class="small-12 columns nicsContext{{element.ID}}">
      <div class="provision_network_selector">
      </div>
    </div>
  </div>
  {{/advancedImportationSection}}
  {{/isFeatureEnabled}}
  {{#isOneFeatureEnabled "show_as_uid_instantiate" "show_as_gid_instantiate"}}
  {{#advancedImportationSection "<i class=\"fas fa-user\"></i>" (tr "Instantiate as different User / Group")}}
  {{#isFeatureEnabled "show_as_uid_instantiate"}}
  <div class="row">
    <div class="small-12 columns usersContext{{element.ID}}">
      <fieldset>
        <div class="provision_uid_selector{{element.ID}}" data-tab-content>{{{usersDatatable}}}</div>
      </fieldset>
    </div>
  </div>
  {{/isFeatureEnabled}}
  {{#isFeatureEnabled "show_as_gid_instantiate"}}
  <div class="row">
    <div class="small-12 columns groupContext{{element.ID}}">
      <fieldset>
        <div class="provision_gid_selector{{element.ID}}" data-tab-content>{{{groupDatatable}}}</div>
      </fieldset>
    </div>
  </div>
  {{/isFeatureEnabled}}
  {{/advancedImportationSection}}
  {{/isOneFeatureEnabled}}
  {{#isFeatureEnabled "show_host_instantiate"}}
  {{#advancedImportationSection "<i class=\"fas fa-hdd\"></i>" (tr "Deploy VM in a specific Host") }}
  <div class="row">
    <div class="small-12 columns hostContext{{element.ID}}">
      <fieldset>
        <div class="provision_host_selector{{element.ID}}" data-tab-content>{{{hostsDatatable}}}</div>
        <div class="row">
            <div class="large-12 columns">
              <label for="SCHED_REQUIREMENTS">
                {{tr "Expression"}}
                {{{tip (tr "Boolean expression that rules out entries from the pool of datastores suitable to run this VM.")}}}
              </label>
              <input type="text" wizard_field="SCHED_REQUIREMENTS" id="SCHED_REQUIREMENTS{{element.ID}}" name="requirements" />
            </div>
        </div>
      </fieldset>
    </div>
  </div>
  {{/advancedImportationSection}}
  {{/isFeatureEnabled}}
  {{#isFeatureEnabled "show_ds_instantiate"}}
  {{#advancedImportationSection "<i class=\"fas fa-folder-open\"></i>" (tr "Deploy VM in a specific Datastore") }}
  <div class="row">
    <div class="small-12 columns dsContext{{element.ID}}">
      <fieldset>
        <div class="provision_ds_selector{{element.ID}}" data-tab-content>{{{dsDatatable}}}</div>
        <div class="row">
            <div class="large-12 columns">
              <label for="SCHED_DS_REQUIREMENTS">
                {{tr "Expression"}}
                {{{tip (tr "Boolean expression that rules out entries from the pool of datastores suitable to run this VM.")}}}
              </label>
              <input type="text" wizard_field="SCHED_DS_REQUIREMENTS" id="SCHED_DS_REQUIREMENTS{{element.ID}}" name="requirements" />
            </div>
        </div>
      </fieldset>
    </div>
  </div>
  {{/advancedImportationSection}}
  {{/isFeatureEnabled}}
  {{#isFeatureEnabled "show_sched_actions_instantiate"}}
  {{#advancedImportationSection "<i class=\"fas fa-calendar-alt\"></i>" (tr "Schedule Actions for VM") }}
  <div class="row">
    <div class="large-12 columns actionContext{{element.ID}}">
      <fieldset>
        {{{table_sched_actions}}}
      </fieldset>
    </div>
  </div>
  {{/advancedImportationSection}}
  {{/isFeatureEnabled}}
  {{#isFeatureEnabled "show_vmgroup_instantiate"}}
  {{#advancedImportationSection "<i class=\"fas fa-folder-open\"></i>" (tr "Associate VM to a VM Group") }}
  <div class="row">
    <div class="small-12 columns vmgroupContext{{element.ID}}">
      <fieldset>
        <div>
          <a class="button small provision_add_vmgroup">
            <i class="fas fa-lg fa-plus-circle add_vmgroup"></i> {{tr "VM Group"}}
          </a>
        </div>
        <div class="provision_vmgroup_selector">
        </div>
      </fieldset>
    </div>
  </div>
  {{/advancedImportationSection}}
  {{/isFeatureEnabled}}
  {{#isFeatureEnabled "vcenter_vm_folder"}}
  {{#advancedImportationSection "<i class=\"fas fa-folder\"></i>" (tr "vCenter Deployment")}}
  <div class="row">
    <div class="medium-6 small-12 columns vcenterVMFolderContext{{element.ID}}">
      <div class="provision_vcenter_vm_folder_selector">
      </div>
    </div>
  </div>
  {{/advancedImportationSection}}
  {{/isFeatureEnabled}}
  {{#isFeatureEnabled "show_boot_order"}}
  {{#advancedImportationSection "<i class=\"fas fa-power-off\"></i>" (tr "OS Booting")}}
  <div class="row">
    <div class="medium-8 columns">
      <label>
        {{tr "Boot order"}}
        {{{tip (tr "Select the devices to boot from, and their order")}}}
      </label>
      <table class="boot-order-instantiate dataTable" value="">
        <tbody>
        </tbody>
      </table>
    </div>
  </div>
  {{/advancedImportationSection}}
  {{/isFeatureEnabled}}
</div>
<br>